/*************************************************************************
	> File Name: Bookshelf.java
	> Author: 
	> Mail: 
	> Created Time: 2018年03月28日 星期三 11时24分41秒
 ************************************************************************/
import java.util.ArrayList;
public class Bookshelf{
    public static void main(String []args){
        Book bk1 = new Book("Java Software Solutions1","John Lewis","Electronics Industry","2018-03-28");
        Book bk2 = new Book("Java Software Solutions3","John Lewis","Electronics Industry","2018-03-28");
        System.out.println(bk1);
        System.out.println("Book1 == Book2:" + bk1.compareTo(bk2));

        ArrayList<Book> bklist = new ArrayList<Book>();
        bklist.add(bk1);
        bklist.add(bk2);

        for(Book bk: bklist)
            System.out.println(bk.getBookname()+"  "+ bk.getAuthor()+ "  "+ bk.getPress()+ "  "+bk.getCopyrightdate());
    }
}

